﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Order.aspx.cs" Inherits="Order" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    
</asp:Content>


<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

    <style type="text/css">

    aside{
          height:500px;width:50%;
          float:right;padding-top:30px;margin-top:30px;
          border-style:solid; border-width:2px; border-color:darkgrey;border-radius:10px;
          background-color:aliceblue;
    }

    .FirstSelect{
            width:95%;height:40px;border-style:solid; border-width:2px;
            border-bottom-color:darkgrey;border-top-color:darkgrey;
            border-left-color:#FFFFFF;border-right-color:#FFFFFF;
            text-align:center;line-height:40px;
    }


    .select{ 
            width:95%;height:40px;border-style:solid; border-width:2px;
            border-bottom-color:darkgrey;border-top-color:#FFFFFF;
            border-left-color:#FFFFFF;border-right-color:#FFFFFF;
            text-align:center;line-height:40px;
    }

    a{text-decoration:none;color: #000000;}

   </style>


    <aside >
     <nav >
         <div class="FirstSelect">
             <a href="PersonalCenter.aspx" >基本信息</a>
         </div>

         <div class="select">
             <a href="ChangePassword.aspx" >修改密码</a>
         </div>
          
         <div class="select">
             <a href="ChangeInformation.aspx" >我发布的</a>
         </div >
         
         <div class="select">
            <a href="Order.aspx" >我的订单</a>
         </div>
         
         <div class="select">
            <a href="BrowsingFootprints.aspx" >浏览足迹</a>
         </div>
         
     </nav>
    </aside>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder3" Runat="Server">
   
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
    
    <style type="text/css">
    .panel{
           border-style:solid; border-width:3px; border-color:darkgrey;
           width:80%;height:500px;padding-top:30px;padding-left:20px;
           margin-top:30px;
    }
    </style>

    <div class="panel">
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="OrderID" DataSourceID="SqlDataSource1" EmptyDataText="没有可显示的数据记录。">
                <Columns>
                    <asp:BoundField DataField="OrderID" HeaderText="订单号" ReadOnly="True" SortExpression="OrderID" />
                    <asp:BoundField DataField="SellerID" HeaderText="卖家ID" SortExpression="SellerID" />
                    <asp:BoundField DataField="SaleOfGoodsID" HeaderText="出售商品ID" SortExpression="SaleOfGoodsID" />
                    <asp:BoundField DataField="LookingOfGoodsID" HeaderText="求购物品ID" SortExpression="LookingOfGoodsID" />
                    <asp:BoundField DataField="GoodsName" HeaderText="物品名称" SortExpression="GoodsName" />
                    <asp:BoundField DataField="Price" HeaderText="价格" SortExpression="Price" />
                    <asp:BoundField DataField="StateOfOrder" HeaderText="订单状态" SortExpression="StateOfOrder" />
                </Columns>
                    <PagerStyle BackColor="#ffffff" HorizontalAlign="center" />
                     <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
                     <HeaderStyle BackColor="#ccccd4" Font-Bold="True" ForeColor="Black" />
                      <EditRowStyle BackColor="#7C6F57" />
                      <AlternatingRowStyle BackColor="White" />
            </asp:GridView>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MyDataConnectionString1 %>" DeleteCommand="DELETE FROM [Order] WHERE [OrderID] = @OrderID" InsertCommand="INSERT INTO [Order] ([OrderID], [SellerID], [BuyerID], [SaleOfGoodsID], [LookingOfGoodsID], [GoodsName], [Price], [StateOfOrder]) VALUES (@OrderID, @SellerID, @BuyerID, @SaleOfGoodsID, @LookingOfGoodsID, @GoodsName, @Price, @StateOfOrder)" ProviderName="<%$ ConnectionStrings:MyDataConnectionString1.ProviderName %>" SelectCommand="SELECT [OrderID], [SellerID], [BuyerID], [SaleOfGoodsID], [LookingOfGoodsID], [GoodsName], [Price], [StateOfOrder] FROM [Order]" UpdateCommand="UPDATE [Order] SET [SellerID] = @SellerID, [BuyerID] = @BuyerID, [SaleOfGoodsID] = @SaleOfGoodsID, [LookingOfGoodsID] = @LookingOfGoodsID, [GoodsName] = @GoodsName, [Price] = @Price, [StateOfOrder] = @StateOfOrder WHERE [OrderID] = @OrderID">
                <DeleteParameters>
                    <asp:Parameter Name="OrderID" Type="String" />
                </DeleteParameters>
                <InsertParameters>
                    <asp:Parameter Name="OrderID" Type="String" />
                    <asp:Parameter Name="SellerID" Type="String" />
                    <asp:Parameter Name="BuyerID" Type="String" />
                    <asp:Parameter Name="SaleOfGoodsID" Type="String" />
                    <asp:Parameter Name="LookingOfGoodsID" Type="String" />
                    <asp:Parameter Name="GoodsName" Type="String" />
                    <asp:Parameter Name="Price" Type="Double" />
                    <asp:Parameter Name="StateOfOrder" Type="String" />
                </InsertParameters>
                <UpdateParameters>
                    <asp:Parameter Name="SellerID" Type="String" />
                    <asp:Parameter Name="BuyerID" Type="String" />
                    <asp:Parameter Name="SaleOfGoodsID" Type="String" />
                    <asp:Parameter Name="LookingOfGoodsID" Type="String" />
                    <asp:Parameter Name="GoodsName" Type="String" />
                    <asp:Parameter Name="Price" Type="Double" />
                    <asp:Parameter Name="StateOfOrder" Type="String" />
                    <asp:Parameter Name="OrderID" Type="String" />
                </UpdateParameters>
            </asp:SqlDataSource>
      <asp:LinqDataSource ID="lddOrder" runat="server" ContextTypeName="MyData" TableName="Order">
      </asp:LinqDataSource>
     

     
   </div>
</asp:Content>


<asp:Content ID="Content5" ContentPlaceHolderID="ContentPlaceHolder4" Runat="Server">

</asp:Content>

